package demo;

import application.DecimalConvert;

public class DemoDecimalConvert {
    public static String[] numberMap = new String[] {
            "零", "一", "二", "三", "四", "五", "六", "七", "八",
            "九", "十", "十一", "十二", "十三", "十四", "十五", "十六"
    };
    public static void test(DecimalConvert decimalConvert, int number, int base) {
        System.out.println("十进制数: " + number);
        decimalConvert.set(number, base);
        System.out.println(String.format("转化为%s进制数为: %s", numberMap[base], decimalConvert.transform()));
    }
    public static void main(String[] args) {
        DecimalConvert decimalConvert = new DecimalConvert();
        test(decimalConvert, 128, 2);
        test(decimalConvert, 128, 16);
        test(decimalConvert, 128, 8);
        System.out.println("\n");
        test(decimalConvert, 63, 2);
        test(decimalConvert, 63, 16);
        test(decimalConvert, 63, 8);
    }
}
